//初始化数据

function tabbarinit() {
  
 

    return [
      {

        "current": 0,
  
        "pagePath": "/pages/sys/manager/index/index",
  
        "iconPath": "/images/nav/home-off.png",
  
        "selectedIconPath": "/images/nav/home-on.png",
  
        "text": "首页"
  
  
  
      },
      {

        "current": 0,
  
        "pagePath": "/pages/sys/manager/gongneng/gongneng",
  
        "iconPath": "/images/nav/classification-off.png",
  
        "selectedIconPath": "/images/nav/classification-on.png",
  
        "text": "功能"
  
  
  
      },
      {

        "current": 0,
  
        "pagePath": "/pages/sys/manager/wode/wode",
  
        "iconPath": "/images/nav/my-off.png",

        "selectedIconPath": "/images/nav/my-on.png",
  
        "text": "我的"
  
  
  
      },
      {

        "current": 0,

        "pagePath": "/pages/sys/paisong/paisong",

        "iconPath": "/images/nav/songhuo-off.png",

        "selectedIconPath": "/images/nav/songhuo.png",

        "text": "我的派送"
      }
    ]
 
  
 
  
 
 }
 
 //tabbar 主入口
 
 function tabbarmain(bindName = "tabdata", id, target) {
   
   var that = target;
 
   var bindData = {};
 
   var otabbar = tabbarinit();
 
   otabbar[id]['iconPath'] = otabbar[id]['selectedIconPath']//换当前的icon
 
   otabbar[id]['current'] = 1;
 
   bindData[bindName] = otabbar
 
   that.setData({ bindData });
 
 }
 module.exports = {

  tabbar: tabbarmain

}